package com.superyee.commonlib.http;


import java.io.File;

public interface HttpFileResponseListener {

    /**
     * 描述：获取数据开始.
     */
    public abstract void onStart(int action, String url);


    /**
     * 完成后调用，失败，成功，调用.
     */
    public abstract void onFinish(int action);


    /**
     * 描述：失败，调用.
     *
     * @param content the content
     * @param error   the error
     */
    public abstract void onFailure(int action, String content, Throwable error);

    /**
     * 描述：无网络
     */
    public abstract void noNetwork(int action);

    /**
     * 进度.
     *
     */
    public abstract void onProgress(int action, long sum, long total);


    /**
     * 下载服务器返回成功
     */
    public abstract void onSuccess(int action, File file, Object obj);

}
